<style>
    .role-selector ul{
        display: inline-block;
    }
    .role-selector li{
        display: inline-block;
    }
    .role-selector li .active::after{
        color: red;
        content: "  ●  ";
    }
</style>
<div class="role-selector">
    <span>点击此处切换身份:</span>
    <ul>
        {foreach $roles as $key=>$role}
        <li>
            <span class="{if isset($role.active) && $role.active}active{/if}">
                <a href="{$role.url}">{$role.name}</a>
            </span>
        </li>
        {/foreach}
    </ul>
</div>
